<template>
	<view class="_createBtnBar padding-top-xs">
		<!-- <view class="bg-gradual-blue align-center text-xl padding-xs text-center margin-bottom-xs" style="width: 100%;">操作</view> -->
		<slot></slot>
		<button v-if="dataSource.ReturnRole && !hideBtnCtr && hideSend == 'false'" class="cu-btn bg-brown light  margin-xs" @click="btnClick('ReturnRole')">退回</button>
		<button v-if="dataSource.SaveEnable && !hideBtnCtr && hideSend == 'false'" class="cu-btn bg-green light  margin-xs" @click="btnClick('SaveEnable')">保存</button>
		<button v-if="dataSource.SendEnable && !hideBtnCtr && hideSend == 'false'" class="cu-btn bg-blue light  margin-xs" @click="btnClick('SendEnable')">发送</button>
	</view>
</template>

<script>
export default {
	props: {
		dataSource: {
			type: Object,
			default: () => {
				return {};
			}
		},
		hideBtnCtr: {
			type: Boolean,
			default: false
		},
		hideSend: {
			type: String,
			default: 'false'
		}
	},
	data() {
		return {};
	},
	methods: {
		btnClick(type) {
			console.log(type);
			this.$emit('btn-click', { type });
		}
	}
};
</script>

<style lang="less">
._createBtnBar {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	button {
		min-width: 200rpx;
	}
}
</style>
